var newDate = new Date();

var _count = '';
_count = !!localStorage.getItem('count') && localStorage.getItem('count') || '{"date":0}';
_count = _count == "{}" ? { date: 0 } : JSON.parse(_count)
if (!_count || newDate.getTime() - _count.date > 1000 * 60 * 60 * 24 * 2) {
    location = '/login?url=' + window.location
}